/**
 * @file        usart.h
 *
 * @brief       
 *
 * @date        Dec 7, 2012 9:20:58 PM
 *
 * @author      avijayak
 *
 * @copyright   (C) 2012 avijayak <avijayak@afflatustech.com>
 * @copyright   (C) 2012 Afflatus Techtronics <www.afflatustech.com>
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 2 of the License, or (at your
 * option) any later version.
 */

#ifndef USART_H_
#define USART_H_

/* ---- System headers ------------------------------------------------------ */
/* ---- Local headers ------------------------------------------------------- */
/* ---- Typedef section (lower_case_type) ----------------------------------- */
/* ---- Constants section (ALL_CAPS) ---------------------------------------- */
/* ---- Macros section (ALL_CAPS) ------------------------------------------- */

static inline void
usart_init( usart_port_type* usart_port )
{

}

/* ---- Global variables section (lower_case) ------------------------------- */

struct uart_ops {
  unsigned int          (*tx_empty)(struct uart_port *);
  void                  (*set_mctrl)(struct uart_port *, unsigned int mctrl);
  unsigned int          (*get_mctrl)(struct uart_port *);
  void                  (*stop_tx)(struct uart_port *, unsigned int tty_stop);
  void                  (*start_tx)(struct uart_port *, unsigned int tty_start);
  void                  (*send_xchar)(struct uart_port *, char ch);
  void                  (*stop_rx)(struct uart_port *);
  void                  (*enable_ms)(struct uart_port *);
  void                  (*break_ctl)(struct uart_port *, int ctl);
  int                   (*startup)(struct uart_port *);
  void                  (*shutdown)(struct uart_port *);
  void                  (*change_speed)(struct uart_port *,
                                        unsigned int cflag,
                                        unsigned int iflag,
                                        unsigned int quot);
  void                  (*pm)(struct uart_port *,
                                        unsigned int state,
                                        unsigned int oldstate);
  int                   (*set_wake)(struct uart_port *, unsigned int state);
  /* Return a string describing the port type */
   const char           *(*type)(struct uart_port *);
  /* Release IO and memory resources used by the port. This includes iounmap
   * if necessary.
   */
   void                 (*release_port)(struct uart_port *);
   /* Request IO and memory resources used by the port. This includes iomapping
    * the port if necessary.
    */
   int                  (*request_port)(struct uart_port *);
   void                 (*config_port)(struct uart_port *, int);
   int                  (*verify_port)(struct uart_port *,
                                       struct serial_struct *);
   int                  (*ioctl)(struct uart_port *, unsigned int,
                                       unsigned long);
};

/* ---- Function prototypes section (lower_case) ---------------------------- */
/* ---- Getter/setter method section (get/set/is_lower_case) ---------------- */


#endif /* USART_H_ */

/* ==== End of file ================= Copyright (C) 2012 Afflatus Techtronics */
